/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tutorial.BuilderSiDAO.BuilderPattern;

import javax.swing.JTextField;
import tutorial.BuilderSiDAO.commons.ptBuilderPersoana;
import tutorial.BuilderSiDAO.customGUI.PersoanaGUIInput;

/**
 * Aceasta este implentarea interfetei Importer
 * la fel ca si SwingExporter, acestei implementari i se injecteaza prin contructor
 * sursa de date (PersoanaGUIInput in cazul acesta)
 * @author Boogie
 */
public class SwingImporter implements ptBuilderPersoana.Importer{

    private final PersoanaGUIInput input;
    public SwingImporter(PersoanaGUIInput input) {
        this.input = input;
    }
    
    

    @Override
    public String importNume() {
        return input.getNumeField().getText();
    }

    @Override
    public String importPrenume() {
       return input.getPrenumeField().getText();
    }

    @Override
    public String importAdresa() {
        return input.getAdresaField().getText();
    }

    @Override
    public void open() {
        //nu face nimic
    }

    @Override
    public void close() {
        //nu face nimic
    }
    
}
